package com.example.printscreen.printscreen.bean;

import java.util.List;

/**
 * author: xiaoluo
 * date: 2017/7/3 15:59
 */
public class ErrorData {
    private List<TupaiError> errors;

    public List<TupaiError> getErrors() {
        return errors;
    }

    public void setErrors(List<TupaiError> errors) {
        this.errors = errors;
    }

    public String errorToString() {
        String error = "";
        for (int i = 0; i < getErrors().size(); i++) {
            error += getErrors().get(i).getField() + " : " + getErrors().get(i).getInfo();
            if (i != getErrors().size() - 1) {
                error += "\n";
            }
        }
        return error;
    }
}
